<template>
  <div class="all">
    <el-form :model="wanyongform" ref="wanyongform" class="demo-wanyongform">
      <h4>一、实验数据记录（每空3分，共75分）</h4>
      <div class="addmargin">
        <el-form-item>
          1. 待改装微安表参数记录 : <br />
          微安表满量程电流Ig=
          <input
            onkeyup="value=value.replace(/[^\d.]/g,'')"
            type="text"
            v-model="wanyongform.one_ig"
          />
          mA； 表头内阻Rg=
          <input
            onkeyup="value=value.replace(/[^\d.]/g,'')"
            type="text"
            v-model="wanyongform.one_rg"
          />
          Ω；<br />
          电池电压E=
          <input
            onkeyup="value=value.replace(/[^\d.]/g,'')"
            type="text"
            v-model="wanyongform.one_e"
          />
          V；
        </el-form-item>
      </div>
      <div class="addmargin">
        2. 各电阻阻值设置计算（计算结果要求保留1位小数）
        <p class="addmargin">⑴分流电阻R1计算：</p>
        仅闭合转换开关1，此时分流电阻计算公式为：<br />

        <img
          class="photo"
          src="https://liuru1.oss-cn-chengdu.aliyuncs.com/img/20220902223432.png"
          alt=""
        />
        <br />
        带入Rg=
        <input
          onkeyup="value=value.replace(/[^\d.]/g,'')"
          type="text"
          v-model="wanyongform.two_one_rg"
        />
        Ω；Ig=
        <input
          onkeyup="value=value.replace(/[^\d.]/g,'')"
          type="text"
          v-model="wanyongform.two_one_ig"
        />
        mA；Im=
        <input
          onkeyup="value=value.replace(/[^\d.]/g,'')"
          type="text"
          v-model="wanyongform.two_one_im"
        />
        mA； <br />
        计算出：R1=
        <input
          onkeyup="value=value.replace(/[^\d.]/g,'')"
          type="text"
          v-model="wanyongform.two_one_r1"
        />
        Ω；<br />
        接入待测电流，得到：I(待测)=
        <input
          onkeyup="value=value.replace(/[^\d.]/g,'')"
          type="text"
          v-model="wanyongform.two_one_lx"
        />
        mA；

        <p class="addmargin">
          为了后续改装电压档和欧姆档的方便，根据电路图，在扩程电流档实现后，可将整个电流扩程电路看作为：
        </p>
        内阻：Rn=Rg//R1 =
        <input
          onkeyup="value=value.replace(/[^\d.]/g,'')"
          type="text"
          v-model="wanyongform.two_one_rn"
        />
        Ω；量程Im=
        <input
          onkeyup="value=value.replace(/[^\d.]/g,'')"
          type="text"
          v-model="wanyongform.two_one_im2"
        />
        mA的电流表。<br />
        <p class="addmargin">⑵分压电阻R2计算：</p>
        仅闭合转换开关2，此时分压电阻计算公式为：<br />
        <img
          class="photo"
          src="https://liuru1.oss-cn-chengdu.aliyuncs.com/img/20220902223514.png"
          alt=""
        /><br />
        带入Vm=
        <input
          onkeyup="value=value.replace(/[^\d.]/g,'')"
          type="text"
          v-model="wanyongform.two_two_vm"
        />
        V；Im=
        <input
          onkeyup="value=value.replace(/[^\d.]/g,'')"
          type="text"
          v-model="wanyongform.two_two_im"
        />
        A；Rn=
        <input
          onkeyup="value=value.replace(/[^\d.]/g,'')"
          type="text"
          v-model="wanyongform.two_two_rn"
        />
        Ω；<br />
        计算出R2=
        <input
          onkeyup="value=value.replace(/[^\d.]/g,'')"
          type="text"
          v-model="wanyongform.two_two_r2"
        />
        Ω；<br />
        接入待测电压，得到：V(待测)=
        <input
          onkeyup="value=value.replace(/[^\d.]/g,'')"
          type="text"
          v-model="wanyongform.two_two_vx"
        />
        V；

        <p class="addmargin">⑶调零电阻R3计算（理论值）：</p>
        根据电路图，仅闭合转换开关3，短接红黑表笔，此时调零电阻计算公式为：<br />
        <img
          class="photo"
          src="https://liuru1.oss-cn-chengdu.aliyuncs.com/img/20220902223552.png"
          alt=""
        />
        <br />
        带入E=
        <input
          onkeyup="value=value.replace(/[^\d.]/g,'')"
          type="text"
          v-model="wanyongform.two_thr_e"
        />
        V；Im=
        <input
          onkeyup="value=value.replace(/[^\d.]/g,'')"
          type="text"
          v-model="wanyongform.two_thr_im"
        />
        A；Rn=
        <input
          onkeyup="value=value.replace(/[^\d.]/g,'')"
          type="text"
          v-model="wanyongform.two_thr_rn"
        />
        Ω；<br />
        计算出R3=
        <input
          onkeyup="value=value.replace(/[^\d.]/g,'')"
          type="text"
          v-model="wanyongform.two_thr_r3"
        />
        Ω；

        <p class="addmargin">⑷校准电阻R4计算（理论值）：</p>
        根据电路图及此微安表表盘刻度，闭合转换开关3和单刀开关，红黑表笔接100Ω电阻。此时校准电阻计算公式为：
        <img
          class="photo"
          src="https://liuru1.oss-cn-chengdu.aliyuncs.com/img/20220902223623.png"
          alt=""
        />
        <br />

        带入：E=
        <input
          onkeyup="value=value.replace(/[^\d.]/g,'')"
          type="text"
          v-model="wanyongform.two_four_e"
        />
        V；I3=
        <input
          onkeyup="value=value.replace(/[^\d.]/g,'')"
          type="text"
          v-model="wanyongform.two_four_i3"
        />
        A；Rx=
        <input
          onkeyup="value=value.replace(/[^\d.]/g,'')"
          type="text"
          v-model="wanyongform.two_four_rx"
        />
        Ω； R3+Rn=
        <input
          onkeyup="value=value.replace(/[^\d.]/g,'')"
          type="text"
          v-model="wanyongform.two_four_r3rn"
        />
        Ω；<br />
        计算出R4=
        <input
          onkeyup="value=value.replace(/[^\d.]/g,'')"
          type="text"
          v-model="wanyongform.two_four_r4"
        />
        Ω；<br />
        接入待测电阻，得到 R(待测)=
        <input
          onkeyup="value=value.replace(/[^\d.]/g,'')"
          type="text"
          v-model="wanyongform.two_four_rx2"
        />
        Ω；
      </div>

      <h4>二、思考题（共25分）</h4>
      <div>
        下图是小明同学根据万用表改装设计实验要求，搭建的电路测试实验截图，请问：
        <img
          src="https://liuru1.oss-cn-chengdu.aliyuncs.com/img/20220902223713.png"
          alt=""
        />
      </div>
      <p class="addmargin">1.指出图中各电阻箱的作用：（每空5分，共20分）</p>
      电阻箱1（
      <input
        @input="wanyongform.thir_one_one = wanyongform.thir_one_one.replace(/[^A-D]/g, '')"
        maxlength="1"
        placeholder="请填写大写字母"
        type="text"
        v-model="wanyongform.thir_one_one"
        style="width: 100px"
      />
      ） 电阻箱2 （
      <input
        @input="wanyongform.thir_one_two = wanyongform.thir_one_two.replace(/[^A-D]/g, '')"
        maxlength="1"
        placeholder="请填写大写字母"
        type="text"
        v-model="wanyongform.thir_one_two"
        style="width: 100px"
      />
      ）<br />
      电阻箱3（
      <input
        @input="wanyongform.thir_one_three = wanyongform.thir_one_three.replace(/[^A-D]/g, '')"
        maxlength="1"
        placeholder="请填写大写字母"
        type="text"
        v-model="wanyongform.thir_one_three"
        style="width: 100px"
      />
      ） 电阻箱4 （
      <input
        @input="wanyongform.thir_one_four = wanyongform.thir_one_four.replace(/[^A-D]/g, '')"
        maxlength="1"
        placeholder="请填写大写字母"
        type="text"
        v-model="wanyongform.thir_one_four"
        style="width: 100px"
      />
      ）<br />
      A. 调零电阻 B. 分流电阻 C. 分压电阻 D. 校准电阻
      <p class="addmargin">2.判断 T or F（每空2.5分，共5分）</p>
      ①实验测试前，微安表未机械调零。<input
        @input="wanyongform.thir_two_one = wanyongform.thir_two_one.replace(/[^TF]/g, '')"
        maxlength="1"
        placeholder="请填写大写字母"
        type="text"
        v-model="wanyongform.thir_two_one"
      />
      <br />
      ②实验测试中，在测量电流时，应该将单刀开关断开。<input
        @input="wanyongform.thir_two_two = wanyongform.thir_two_two.replace(/[^TF]/g, '')"
        maxlength="1"
        placeholder="请填写大写字母"
        type="text"
        v-model="wanyongform.thir_two_two"
      />
      <h4>线上资源</h4>
      <p class="addmargin">
        1）在线实验报告系统链接：
        <a style="text-decoration: none;" href="http://180.76.111.200:3001/"
          >http://180.76.111.200:3001/</a
        >
      </p>
      <el-form-item>
        <el-button plain class="btn" type="primary" @click="storage()"
          >暂存</el-button
        >
        <el-button class="btn" type="primary" @click="onsubmit('wanyongform')"
          >提交</el-button
        >
      </el-form-item>
    </el-form>
    <!-- 暂存按钮的弹窗 -->
    <el-dialog title="提示" :visible.sync="DialogVisible" width="30%" center>
      <el-divider></el-divider>
      <div style="text-align: center">
        请 您 确 定 您 是 否 要 暂 存 ？
      </div>
      <el-divider></el-divider>
      <span slot="footer" class="dialog-footer">
        <el-button plain @click="DialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="(DialogVisible = false), storageOk()"
          >确 定</el-button
        >
      </span>
    </el-dialog>
  </div>
</template>

<script>
export default {
  data() {
    return {
      wanyongform: {
        one_ig: "",
        one_rg: "",
        one_e: "",
        two_one_rg: "",
        two_one_ig: "",
        two_one_im: "",
        two_one_r1: "",
        two_one_lx: "",
        two_one_rn: "",
        two_one_im2: "",
        two_two_vm: "",
        two_two_im: "",
        two_two_rn: "",
        two_two_r2: "",
        two_two_vx: "",
        two_thr_e: "",
        two_thr_im: "",
        two_thr_rn: "",
        two_thr_r3: "",
        two_four_e: "",
        two_four_i3: "",
        two_four_rx: "",
        two_four_r3rn: "",
        two_four_r4: "",
        two_four_rx2: "",
        thir_one_one: "",
        thir_one_two: "",
        thir_one_three: "",
        thir_one_four: "",
        thir_two_one: "",
        thir_two_two: "",
      },
      DialogVisible: false
    };
  },
  created() {
    // 暂存
    this.storageCheck();
    localStorage.setItem("state9", 1);
  },
  // 暂存
  //1 首先进入页面的时候需要监听浏览器的后退按钮，之后在操作的时候执行函数,在mounted中挂载去监听这个事件，并在methods里面添加函数，用来判断执行的条件
  mounted() {
    if (window.history && window.history.pushState) {
      history.pushState(null, null, document.URL);
      const state9 = localStorage.getItem("state9");
      // console.log(state9);
      window.addEventListener("popstate", this.back, false);
    }
  },
  // 暂存
  // 2：需要在退出页面的时候销毁这个监听事件
  destroyed() {
    window.removeEventListener("popstate", this.back, false);
  },
  methods: {
    // 暂存
    back() {
      // console.log(123);
      const state9 = localStorage.getItem("state9");
      // console.log(state9);
      if (state9 == 1) {
        // console.log(1111);
        this.$confirm(
          "检测到未保存的内容，是否在离开页面前保存？",
          "确认信息",
          {
            confirmButtonText: "暂存",
            cancelButtonText: "放弃修改",
            type: "warning",
            center: true
          }
        )
          .then(() => {
            // this.$router.go(-1)
            // this.DialogVisible = true
            const state9 = localStorage.getItem("state9");
            // console.log(state9);
            // this.$message({
            //   type: "success",
            //   message: "暂存成功！",
            // });
            this.BackStorage();
            if (this.$route.path !== "/home") {
              this.$router.push({ path: "/home" });
            }
            // this.$router.push("/home");
            return false;
          })
          .catch(() => {
            // const state9 = sessionStorage.getItem('state9')
            // console.log(state9)
            this.$message({
              type: "info",
              message: "已取消暂存！",
            });
            if (this.$route.path !== "/home") {
              this.$router.push({ path: "/home" });
            }
            // this.giveUp()
            return false;
          });
      } else {
        // console.log(2222);
        this.$router.push({ path: "/home" });
      }
    },
    // 暂存
    // 放弃保存
    giveUp() {
      // console.log(345);
      window.localStorage.clear();
      if (this.$route.path !== "/home") {
        this.$router.push({ path: "/home" });
      }
    },
    async onsubmit() {
              // 验证为null
              for (var key in this.wanyongform) {
        // console.log(this.wanyongform[key]);
        if (this.wanyongform[key] == 'null') {
          this.$message.error("题目未做完！");
          return false;
        }
      }
      for (var key in this.wanyongform) {
        if (!this.wanyongform[key]) {
          this.$message.error("题目未做完！");
          return false;
        }
      }
      const { data: res } = await this.$http.post(
        "/api/wanyongbiao/luru",
        this.wanyongform
      );
      // console.log(res);
      if (res.data.res1 == false) {
        this.$message.error("请勿重复提交！");
        this.$router.push("/home");
      } else {
        if (res.code == 100) {
          this.$message.error("提交失败！");
        }
        if (res.code == 150) {
          this.$message.error("请勿重复提交！");
        }
        if (res.code == 422) {
          this.$message.error("请填完所有题目");
        }
        if (res.code == 200) {
          // 暂存
          window.localStorage.clear();
          this.$message.success("提交成功！");
          this.$router.push("/home");
        }
      }
    },
    // 暂存弹窗出现
    storage() {
          this.DialogVisible = true;
    },
    // 暂存弹窗里面的确定按钮
    storageOk() {
      window.localStorage.setItem("wanyongone_ig", this.wanyongform.one_ig);
      window.localStorage.setItem("wanyongone_rg", this.wanyongform.one_rg);
      window.localStorage.setItem("wanyongone_e", this.wanyongform.one_e);
      window.localStorage.setItem("wanyongtwo_one_rg", this.wanyongform.two_one_rg);
      window.localStorage.setItem("wanyongtwo_one_ig", this.wanyongform.two_one_ig);
      window.localStorage.setItem("wanyongtwo_one_im", this.wanyongform.two_one_im);
      window.localStorage.setItem("wanyongtwo_one_r1", this.wanyongform.two_one_r1);
      window.localStorage.setItem("wanyongtwo_one_lx", this.wanyongform.two_one_lx);
      window.localStorage.setItem("wanyongtwo_one_rn", this.wanyongform.two_one_rn);
      window.localStorage.setItem("wanyongtwo_one_im2", this.wanyongform.two_one_im2);
      window.localStorage.setItem("wanyongtwo_two_vm", this.wanyongform.two_two_vm);
      window.localStorage.setItem("wanyongtwo_two_im", this.wanyongform.two_two_im);
      window.localStorage.setItem("wanyongtwo_two_rn", this.wanyongform.two_two_rn);
      window.localStorage.setItem("wanyongtwo_two_r2", this.wanyongform.two_two_r2);
      window.localStorage.setItem("wanyongtwo_two_vx", this.wanyongform.two_two_vx);
      window.localStorage.setItem("wanyongtwo_thr_e", this.wanyongform.two_thr_e);
      window.localStorage.setItem("wanyongtwo_thr_im", this.wanyongform.two_thr_im);
      window.localStorage.setItem("wanyongtwo_thr_rn", this.wanyongform.two_thr_rn);
      window.localStorage.setItem("wanyongtwo_thr_r3", this.wanyongform.two_thr_r3);
      window.localStorage.setItem("wanyongtwo_four_e", this.wanyongform.two_four_e);
      window.localStorage.setItem("wanyongtwo_four_i3", this.wanyongform.two_four_i3);
      window.localStorage.setItem("wanyongtwo_four_rx", this.wanyongform.two_four_rx);
      window.localStorage.setItem("wanyongtwo_four_r3rn", this.wanyongform.two_four_r3rn);
      window.localStorage.setItem("wanyongtwo_four_r4", this.wanyongform.two_four_r4);
      window.localStorage.setItem("wanyongtwo_four_rx2", this.wanyongform.two_four_rx2);
      window.localStorage.setItem("wanyongthir_one_one", this.wanyongform.thir_one_one);
      window.localStorage.setItem("wanyongthir_one_two", this.wanyongform.thir_one_two);
      window.localStorage.setItem("wanyongthir_one_three", this.wanyongform.thir_one_three);
      window.localStorage.setItem("wanyongthir_one_four", this.wanyongform.thir_one_four);
      window.localStorage.setItem("wanyongthir_two_one", this.wanyongform.thir_two_one);
      window.localStorage.setItem("wanyongthir_two_two", this.wanyongform.thir_two_two);
      this.$message({
        message: "暂存成功！",
        type: "success",
      });
      localStorage.setItem("state9", 2);
    },
    // 浏览器返回里面的暂存
    BackStorage() {
      window.localStorage.setItem("wanyongone_ig", this.wanyongform.one_ig);
      window.localStorage.setItem("wanyongone_rg", this.wanyongform.one_rg);
      window.localStorage.setItem("wanyongone_e", this.wanyongform.one_e);
      window.localStorage.setItem("wanyongtwo_one_rg", this.wanyongform.two_one_rg);
      window.localStorage.setItem("wanyongtwo_one_ig", this.wanyongform.two_one_ig);
      window.localStorage.setItem("wanyongtwo_one_im", this.wanyongform.two_one_im);
      window.localStorage.setItem("wanyongtwo_one_r1", this.wanyongform.two_one_r1);
      window.localStorage.setItem("wanyongtwo_one_lx", this.wanyongform.two_one_lx);
      window.localStorage.setItem("wanyongtwo_one_rn", this.wanyongform.two_one_rn);
      window.localStorage.setItem("wanyongtwo_one_im2", this.wanyongform.two_one_im2);
      window.localStorage.setItem("wanyongtwo_two_vm", this.wanyongform.two_two_vm);
      window.localStorage.setItem("wanyongtwo_two_im", this.wanyongform.two_two_im);
      window.localStorage.setItem("wanyongtwo_two_rn", this.wanyongform.two_two_rn);
      window.localStorage.setItem("wanyongtwo_two_r2", this.wanyongform.two_two_r2);
      window.localStorage.setItem("wanyongtwo_two_vx", this.wanyongform.two_two_vx);
      window.localStorage.setItem("wanyongtwo_thr_e", this.wanyongform.two_thr_e);
      window.localStorage.setItem("wanyongtwo_thr_im", this.wanyongform.two_thr_im);
      window.localStorage.setItem("wanyongtwo_thr_rn", this.wanyongform.two_thr_rn);
      window.localStorage.setItem("wanyongtwo_thr_r3", this.wanyongform.two_thr_r3);
      window.localStorage.setItem("wanyongtwo_four_e", this.wanyongform.two_four_e);
      window.localStorage.setItem("wanyongtwo_four_i3", this.wanyongform.two_four_i3);
      window.localStorage.setItem("wanyongtwo_four_rx", this.wanyongform.two_four_rx);
      window.localStorage.setItem("wanyongtwo_four_r3rn", this.wanyongform.two_four_r3rn);
      window.localStorage.setItem("wanyongtwo_four_r4", this.wanyongform.two_four_r4);
      window.localStorage.setItem("wanyongtwo_four_rx2", this.wanyongform.two_four_rx2);
      window.localStorage.setItem("wanyongthir_one_one", this.wanyongform.thir_one_one);
      window.localStorage.setItem("wanyongthir_one_two", this.wanyongform.thir_one_two);
      window.localStorage.setItem("wanyongthir_one_three", this.wanyongform.thir_one_three);
      window.localStorage.setItem("wanyongthir_one_four", this.wanyongform.thir_one_four);
      window.localStorage.setItem("wanyongthir_two_one", this.wanyongform.thir_two_one);
      window.localStorage.setItem("wanyongthir_two_two", this.wanyongform.thir_two_two);
      this.$message({
        message: "暂存成功！",
        type: "success",
      });
      // localStorage.setItem("state9", 2);
    },
    // 获取暂存里面的数据
    storageCheck() {
      const one_ig = window.localStorage.getItem("wanyongone_ig");
      this.wanyongform.one_ig = one_ig;
      const one_rg = window.localStorage.getItem("wanyongone_rg");
      this.wanyongform.one_rg = one_rg;
      const one_e = window.localStorage.getItem("wanyongone_e");
      this.wanyongform.one_e = one_e;
      const two_one_rg = window.localStorage.getItem("wanyongtwo_one_rg");
      this.wanyongform.two_one_rg = two_one_rg;
      const two_one_ig = window.localStorage.getItem("wanyongtwo_one_ig");
      this.wanyongform.two_one_ig = two_one_ig;
      const two_one_im = window.localStorage.getItem("wanyongtwo_one_im");
      this.wanyongform.two_one_im = two_one_im;
      const two_one_r1 = window.localStorage.getItem("wanyongtwo_one_r1");
      this.wanyongform.two_one_r1 = two_one_r1;
      const two_one_lx = window.localStorage.getItem("wanyongtwo_one_lx");
      this.wanyongform.two_one_lx = two_one_lx;
      const two_one_rn = window.localStorage.getItem("wanyongtwo_one_rn");
      this.wanyongform.two_one_rn = two_one_rn;
      const two_one_im2 = window.localStorage.getItem("wanyongtwo_one_im2");
      this.wanyongform.two_one_im2 = two_one_im2;
      const two_two_vm = window.localStorage.getItem("wanyongtwo_two_vm");
      this.wanyongform.two_two_vm = two_two_vm;
      const two_two_im = window.localStorage.getItem("wanyongtwo_two_im");
      this.wanyongform.two_two_im = two_two_im;
      const two_two_rn = window.localStorage.getItem("wanyongtwo_two_rn");
      this.wanyongform.two_two_rn = two_two_rn;
      const two_two_r2 = window.localStorage.getItem("wanyongtwo_two_r2");
      this.wanyongform.two_two_r2 = two_two_r2;
      const two_two_vx = window.localStorage.getItem("wanyongtwo_two_vx");
      this.wanyongform.two_two_vx = two_two_vx;
      const two_thr_e = window.localStorage.getItem("wanyongtwo_thr_e");
      this.wanyongform.two_thr_e = two_thr_e;
      const two_thr_im = window.localStorage.getItem("wanyongtwo_thr_im");
      this.wanyongform.two_thr_im = two_thr_im;
      const two_thr_rn = window.localStorage.getItem("wanyongtwo_thr_rn");
      this.wanyongform.two_thr_rn = two_thr_rn;
      const two_thr_r3 = window.localStorage.getItem("wanyongtwo_thr_r3");
      this.wanyongform.two_thr_r3 = two_thr_r3;
      const two_four_e = window.localStorage.getItem("wanyongtwo_four_e");
      this.wanyongform.two_four_e = two_four_e;
      const two_four_i3 = window.localStorage.getItem("wanyongtwo_four_i3");
      this.wanyongform.two_four_i3 = two_four_i3;
      const two_four_rx = window.localStorage.getItem("wanyongtwo_four_rx");
      this.wanyongform.two_four_rx = two_four_rx;
      const two_four_r3rn = window.localStorage.getItem("wanyongtwo_four_r3rn");
      this.wanyongform.two_four_r3rn = two_four_r3rn;
      const two_four_r4 = window.localStorage.getItem("wanyongtwo_four_r4");
      this.wanyongform.two_four_r4 = two_four_r4;
      const two_four_rx2 = window.localStorage.getItem("wanyongtwo_four_rx2");
      this.wanyongform.two_four_rx2 = two_four_rx2;
      const thir_one_one = window.localStorage.getItem("wanyongthir_one_one");
      this.wanyongform.thir_one_one = thir_one_one;
       const thir_one_two = window.localStorage.getItem("wanyongthir_one_two");
      this.wanyongform.thir_one_two = thir_one_two;
      const thir_one_three = window.localStorage.getItem("wanyongthir_one_three");
      this.wanyongform.thir_one_three = thir_one_three;
      const thir_one_four = window.localStorage.getItem("wanyongthir_one_four");
      this.wanyongform.thir_one_four = thir_one_four;
      const thir_two_one = window.localStorage.getItem("wanyongthir_two_one");
      this.wanyongform.thir_two_one = thir_two_one;
      const thir_two_two = window.localStorage.getItem("wanyongthir_two_two");
      this.wanyongform.thir_two_two = thir_two_two;
      for (var key in this.wanyongform) {
        // console.log(this.wanyongform[key]);
        if (this.wanyongform[key] == 'null') {
          this.wanyongform[key] = ''
          // return false;
        }
      }
    },
  },
};
</script>

<style scoped>
.photo {
  height: 80px;
  margin: 10px;
  float: none;
  margin-left: 100px;
  background-color: rgba(231, 231, 231, 0.663);
}
.addmargin {
  margin: 10px 0px;
}

.average_dcm {
  position: absolute;
  width: 160px;
  top: 35px;
  left: 330px;
  height: 165px;
}

td,
th {
  border: 0.2px solid rgb(15, 15, 15);
}
.all {
  height: 100%;
  width: 50%;
  min-width: 320px;
  margin: 0 auto;
}

/* .btn {
  width: 20%;
  margin-left: 40%;
  margin-bottom: 2vw;
} */
.btn {
  /* width: 20%;
  margin-left: 40%;
  margin-bottom: 2vw; */
  left: 0%;
  margin-bottom: 5%;
  bottom: 0%;
  width: 20%;
  transform: translate(120%, 30%);
}
.el-radio-group {
  margin: 10px;
}
.el-radio {
  padding: 5px;
}
input {
  width: 92px;
}
</style>
